<?php
include '../common.func.php';
$categorys = getCategorys();
foreach ($categorys as $c) {
    $name = $c['name'];
    $posts = array();
    $postIndex = $c['posts'];
    foreach ($postIndex as $post) {
        array_push($posts, getPostById($post));
    }

    $config = array();
    $config['posts'] = $posts;
    $config['title'] = '分类 ' . $name;
    $config['filename'] = $name;
    $config['dir'] = ROOT . '/category';
    $config['document_root'] = '/category';
    echo "compile paging $name ...\n";
    compilePaging($config);
}
